import request from './request';
interface adminEnterFc {
    adminUser: string;
    adminPass: string;
}

interface delbannerType {
    id: string
}

interface delShopType {
    shopId: string
}

interface delUserType {
    id: string
}

//一、管理员方面：
// 1、管理员登录接口
export const getAdministrator = (data: adminEnterFc) => request.post('/admins/api/admin/login', data)

// 获取管理员列表数据
export const getAdminList = () => request.get('/admins/api/admin/list')

// 添加管理员
export const addAdmin = (data: any) => request.post('/admins/api/admin/adds', data)

// 删除管理员
export const delAdmin = (data: any) => request.post('/admins/api/admin/remove', data)

// 轮播图信息列表
export const bannerDataList = () => request.get('/banans/api/getimg')

// 删除轮播图
export const delBannerList = (data: delbannerType) => request.post(`/banans/api/delimg`, data)

// 增加轮播图
export const addBannerList = (data: any) => request.post('/banans/api/upload', data)

// 修改轮播图
export const updateBannerList = (data: any) => request.post('/banans/api/updata', data)

// 藏品页面
// 藏品信息
export const shopList = () => request.get('/shops/api/shoplist')

// 删除藏品信息
export const delShopList = (data: delShopType) => request.post(`/shops/api/admin/remove`, data)

// 增加藏品信息
export const addShopList = (data: any) => request.post('/shops/api/admin/add', data)

// 修改藏品信息
export const updateShopList = (id: string, data: any) => request.put(`/shops/api/admin/update/${id}`, data)

// 获取用户列表信息
export const getUserList = () => request.get('/admins/api/admin/list')

// 删除用户信息
export const delUserList = (data: delUserType) => request.post(`/admins/api/admin/remuser`, data)